﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;


namespace OAuth2.Provider.Domain
{
    public class AuthorizationGrantBase
    {
        public virtual string Code { get; set; }

        public virtual string ResponseType { get; set; }

        public virtual string State { get; set; }

        public virtual bool IsApproved { get; set; }

        public IDictionary<string, object> ToResponseValues() {
            Dictionary<string, object> parameters = new Dictionary<string, object>();
            parameters.Add(OAuth2.Framework.Parameters.AuthroizationCode, Code);
            parameters.Add(OAuth2.Framework.Parameters.ResponseType, ResponseType);
            parameters.Add(OAuth2.Framework.Parameters.State, State);
            parameters.Add(OAuth2.Framework.Parameters.IsApproved, IsApproved);
            return parameters;
        }
    }
}
